/*
 *      stone.h
 *      
 *      Copyright 2008 Antti Leivo <skylark@skylark-desktop>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */


#ifndef STONE_H
#define STONE_H

#include "chipmunk.h"

#define STONE_DENSITY_KGM3 4000 /* kg/m³ */

typedef enum{stBall, stBox} EStoneType;

class StoneForm
{
	public:
	
	/* ball constructor */
	StoneForm(float _radius=1);
	/* box constructor */
	StoneForm(float _width, float height);
	
	EStoneType type;
	float width, height;
};

class Stone
{
	public:
		Stone(StoneForm form, float _x, float _y, float _vx=0, float _vy=0, float _angle=0, float _angvel=0);
		virtual ~Stone();
		void attachCpSpace(cpSpace *_space);

		StoneForm form;

		/* chipmunk object */
		cpSpace *space; /* pointer to host space (not created by Stone) */
		cpBody *body;
		cpShape *shape;

	private:
		/* add your private declarations */
};

#endif /* STONE_H */ 

